<template>
  <view :style="themeColor">
    <view class="page">
      <view class="flex benben-position-layout flex flex-wrap align-center classificationPage_flex_0"
        :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
        <view class='flex flex-wrap align-center justify-between flex-sub classificationPage_fd0_0'>
          <view class='flex flex-wrap align-center classificationPage_fd0_0_c0' @tap.stop="handleJumpDiy"
            data-type="back" data-url="1">
            <text class='fu-iconfont2  classificationPage_fd0_0_c0_c0'>&#xE794;</text>
          </view>
          <view class='flex flex-wrap align-stretch justify-center'>
            <text class='classificationPage_fd0_0_c1_c0'>分类</text>
          </view>
          <view class='flex flex-wrap align-center justify-end classificationPage_fd0_0_c0'>
          </view>
        </view>

      </view>
      <view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
      <!---flex布局flex布局开始-->
      <view class="flex flex-direction flex-wrap align-stretch benben-flex-layout classificationPage_flex_1">
        <benben-select-diy ref="showSelectPopup1705107416700" class-name='flex flex-direction align-stretch flex'
          :items.sync="classificationType" v-model="classificationObj.aid" :label.sync="classificationObj.name"
          @change="throwClassificationFunc()" default-type="aid" default-label="cate_name" :allow-cancel='false'
          type="radio" :disabled='false'>
          <template v-for='(item,key0) in classificationType'>
            <view v-if="item.isSelected" class='flex align-center justify-between flex classificationPage_fd1_0_c0'
              :key="key0" @tap="$refs.showSelectPopup1705107416700.tapHandle(key0)">
              <text class='classificationPage_fd1_0_c0_c0'>{{item.cate_name}}</text>
              <image class='classificationPage_fd1_0_c0_c1' mode="aspectFit" :src='STATIC_URL+"89.png"'></image>
            </view>
            <view v-else class='flex justify-between flex classificationPage_fd1_0_c0' :key="key0"
              @tap="$refs.showSelectPopup1705107416700.tapHandle(key0)">
              <text class='classificationPage_fd1_0_c0_c0'>{{item.cate_name}}</text>
            </view>
          </template></benben-select-diy>
      </view>

      <!---flex布局flex布局结束-->


    </view>
  </view>
</template>
<script>
  import {
    validate
  } from '@/common/utils/validate.js'

  export default {
    components: {},


    data() {
      return {
        "classificationType": [],
        "classificationObj": {
          "aid": "",
          "name": ""
        }
      };
    },
    computed: {
      themeColor() {
        return this.$store.getters.themeColor
      },

    },
    watch: {},
    onLoad(options) {
      this.getPostFunc()
    },
    onUnload() {

    },
    onReady() {

    },
    onShow() {

    },
    onHide() {

    },
    onResize() {

    },
    onPullDownRefresh() {

    },
    onReachBottom(e) {

    },
    onPageScroll(e) {

    },
    methods: {
      //获取帖子分类
      async getPostFunc() {
        //请求方法
        //数据验证

        let dataclassificationType = await this.$api.get(global.apiUrls.post6576ce2301251, {

        });

        if (dataclassificationType.data.code != 1) {
          this.$message.info(dataclassificationType.data.msg);
          return
        }
        let infoclassificationType = dataclassificationType.data;
        this.classificationType = infoclassificationType.data

      },
      //抛出分类
      throwClassificationFunc() {
        uni.$emit('fenlei', this.classificationObj)
        this.$urouter.navigateBack(1);
      }
    }
  };
</script>
<style lang="scss" scoped>
  .page {
    width: 100vw;
    overflow-x: hidden;
    min-height: calc(100vh - var(--window-bottom));
    background: rgba(255, 255, 255, 1);
    background-size: 100% auto;
  }

  .classificationPage_flex_0 {
    border-bottom: 1px solid #eee;
    background: #fff;
    width: 750rpx;
    height: 88rpx;
    overflow: hidden;
    z-index: 10;
    top: 0rpx;
    background-size: 100% auto !important;
  }

  .classificationPage_fd0_0_c1_c0 {
    font-size: 36rpx;
    font-weight: 700;
    color: #333333;
    line-height: 50rpx;
  }

  .classificationPage_fd0_0_c0_c0 {
    font-size: 36rpx;
    color: #333;
  }

  .classificationPage_fd0_0_c0 {
    width: 120rpx;
  }

  .classificationPage_fd0_0 {
    padding: 0rpx 32rpx 0rpx 32rpx;
  }

  .classificationPage_flex_1 {
    padding: 0rpx 32rpx 0rpx 32rpx;
  }

  .classificationPage_fd1_0_c0_c1 {
    width: 26rpx;
    height: 18rpx;
    border-radius: 0rpx 0rpx 0rpx 0rpx;
  }

  .classificationPage_fd1_0_c0_c0 {
    color: #333333;
    font-size: 32rpx;
    font-weight: 400;
    line-height: 32rpx;
  }

  .classificationPage_fd1_0_c0 {
    border-bottom: 1px solid #eee;
    padding: 32rpx 0rpx 32rpx 0rpx;
  }
</style>